/* 全局样式 */
body {
    background-color: #f8f9fa;
    font-family: 'Microsoft YaHei', sans-serif;
}

.container {
    max-width: 1200px;
    /* padding-top: 20px; */
    /* padding-bottom: 80px; */
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
}

.card-header {
    background-color: #f1f8ff;
    border-bottom: 1px solid #e3f2fd;
    border-radius: 10px 10px 0 0 !important;
}

.card-header h5 {
    margin-bottom: 0;
    color: #0d6efd;
}

/* 版本导航栏样式 */
.version-nav {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.version-nav .nav-link {
    padding: 15px 10px;
    color: #495057;
    border-radius: 0;
    text-align: center;
    transition: all 0.3s ease;
}

.version-nav .nav-link:hover {
    background-color: #f8f9fa;
}

.version-nav .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

.version-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.version-desc {
    font-size: 12px;
    opacity: 0.8;
}

/* 旧版本选择样式（保留以备不时之需） */
.version-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.version-card:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.version-card.selected {
    background-color: #e3f2fd;
    border-color: #0d6efd;
}

.version-details {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 岗位列表样式 */
.job-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 0;
}

.job-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.job-item:hover {
    background-color: #e9ecef;
}

.job-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #0d6efd;
}

.job-tag {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 6px 12px;
    margin: 0 8px 8px 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.job-tag:hover {
    background-color: #dee2e6;
}

.job-tag.selected {
    background-color: #0d6efd;
    color: white;
}

.job-tag .delete-icon {
    margin-left: 8px;
    font-size: 14px;
    opacity: 0.7;
}

.job-tag .delete-icon:hover {
    opacity: 1;
}

/* 关键词列表样式 */
.keyword-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 关键词部分标题 */
.keyword-section-title {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    padding-left: 5px;
    border-left: 3px solid #007bff;
}

/* 关键词标签样式 */
.keyword-tag {
    display: inline-block;
    margin: 5px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: default;
    position: relative;
    transition: all 0.2s ease;
}

/* 包含关键词标签 */
.keyword-tag.include {
    background-color: #e7f3ff;
    border: 1px solid #b8daff;
    color: #0056b3;
}

.keyword-tag.include:before {
    content: "";
    font-size: 0.8rem;
    opacity: 0.7;
}

.keyword-tag.include:hover {
    background-color: #d1e7ff;
}

/* 排除关键词标签 */
.keyword-tag.exclude {
    background-color: #ffe7e7;
    border: 1px solid #ffb8b8;
    color: #b30000;
}

.keyword-tag.exclude:before {
    content: "排除: ";
    font-size: 0.8rem;
    opacity: 0.7;
}

.keyword-tag.exclude:hover {
    background-color: #ffd1d1;
}

/* 删除图标样式 */
.keyword-tag .delete-icon {
    margin-left: 5px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
}

.keyword-tag .delete-icon:hover {
    opacity: 1;
}

/* 关键词关系选择器 */
.keyword-relation {
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.keyword-relation .form-check {
    display: inline-block;
    margin-right: 15px;
}

/* 日志容器样式 */
.log-container {
    height: 300px;
    overflow-y: auto;
    background-color: #212529;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-entry {
    margin-bottom: 3px;
    line-height: 1.4;
}

/* 错误日志样式 */
.log-error {
    color: #ff6b6b;
    font-weight: 500;
}

/* 按钮样式 */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* 表单样式 */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 版本信息样式 */
#version-info {
    font-size: 0.95rem;
}

#current-version,
#greet-count,
#remaining-quota,
#expiry-date {
    font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-top: 10px;
        padding-bottom: 100px;
    }

    .job-list,
    .keyword-list {
        max-height: 150px;
    }

    .version-nav .nav-link {
        padding: 10px 5px;
    }

    .version-title {
        font-size: 1rem;
    }

    .version-desc {
        font-size: 0.7rem;
    }

    .function-options {
        flex-direction: column;
        gap: 10px;
    }

    .function-options .form-check-inline {
        width: 100%;
        padding: 10px;
    }

    .function-desc {
        /* padding-left: 10px; */
    }
}

/* 模态框样式 */
.modal-header {
    background-color: #f1f8ff;
    border-bottom: 1px solid #e3f2fd;
}

.modal-header .modal-title {
    color: #0d6efd;
    font-weight: bold;
}

/* 自定义弹框样式 */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 错误弹框样式 */
#customErrorModal .modal-header {
    background-color: #dc3545;
    color: white;
}

#customErrorModal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 提示弹框样式 */
#customAlertModal .modal-header {
    background-color: #0d6efd;
    color: white;
}

#customAlertModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 输入弹框样式 */
#customInputModal .modal-header {
    background-color: #f8f9fa;
}

#customInputField {
    margin-top: 10px;
}

/* 弹框动画效果 */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translateY(-20px);
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* 功能选择样式 */
.function-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.function-options .form-check-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 0;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    width: calc(33.33% - 14px);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

.function-options .form-check-inline:hover {
    background-color: #e9ecef;
}

.function-options .form-check-input {
    position: absolute;
    opacity: 0;
}

.function-options .form-check-inline .form-check-label {
    cursor: pointer;
    padding: 5px 0;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
}

.function-options .form-check-input:checked~.form-check-label {
    font-weight: bold;
    color: #0d6efd;
}

.function-options .form-check-input:checked~.function-desc {
    color: #495057;
}

.function-options .form-check-input:checked+div {
    color: #0d6efd;
}

.function-options .form-check-input:checked~.form-check-label .badge {
    background-color: #0d6efd !important;
    color: white !important;
}

.function-options .form-check-input:checked~* {
    opacity: 1;
}

.function-options .form-check-input:checked~div~.function-desc {
    opacity: 0.9;
}

.function-options .form-check-input:checked~.function-desc {
    opacity: 0.9;
}

.function-options .form-check-input:checked+.d-flex {
    border-bottom: 2px solid #0d6efd;
    margin-bottom: 5px;
}

.function-options .form-check-input:checked~.form-check-label {
    color: #0d6efd;
    border-color: #0d6efd;
}

.function-options .form-check-input:checked~.function-desc {
    color: #495057;
}

.function-options .form-check-input:checked+.d-flex .form-check-label {
    color: #0d6efd;
}

.function-options .form-check-input:checked+.d-flex .badge {
    background-color: #0d6efd !important;
    color: white !important;
}

.function-options .form-check-input:checked~.form-check-label {
    font-weight: bold;
}

.function-options .form-check-input:disabled~.form-check-label {
    color: #6c757d;
    opacity: 0.7;
    cursor: not-allowed;
}

.function-options .form-check-input:disabled~* {
    opacity: 0.7;
}

.function-options .form-check-input:checked {
    display: none;
}

.function-options .form-check-inline:has(.form-check-input:checked) {
    background-color: #e3f2fd;
    border-color: #0d6efd;
    box-shadow: 0 0 0 1px #0d6efd;
}

.function-options .badge {
    font-size: 0.7rem;
    padding: 2px 5px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.function-desc {
    font-size: 11px;
    color: #6c757d;
    /* margin-top: 5px;
    padding-left: 20px; */
    width: 100%;
    transition: all 0.3s ease;
}

/* 控制按钮容器样式 */
.control-buttons-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 1000;
}

/* 平台选项样式 */
.platform-options {
    display: flex;
    /* flex-direction: column; */
    flex-wrap: wrap;
    gap: 10px;
}

.platform-options .form-check-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
    position: relative;
    margin-right: 0;
}

.platform-options .form-check-inline:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.platform-options .form-check-input {
    position: absolute;
    right: 15px;
    top: 15px;
}

.platform-options .form-check-input:checked+.d-flex .form-check-label {
    font-weight: 600;
    color: #0d6efd;
}

.platform-options .form-check-inline:has(.form-check-input:checked) {
    background-color: rgba(13, 110, 253, 0.05);
    border-color: #0d6efd;
}

.platform-options .form-check-input:disabled+.d-flex .form-check-label {
    color: #6c757d;
}

@media (max-width: 768px) {
    .platform-options .form-check-inline {
        padding: 8px 12px;
    }

    .platform-options .form-check-input {
        right: 10px;
        top: 10px;
    }
}